package com.liang.cloud.Entity;

import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

@Data
@Entity
@DynamicUpdate//当实体类中没有时间属性，插入到数据库会自动更新
              //但是当实体类中有时间属性，插入到数据库中是不会变的，即使sql语句里写了
              //就需要这个实时更新
public class ProductCategory {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer categoryId;

    private String categoryName;

    private Integer categoryType;

    private Date createTime;

    private Date updateTime;

    private String categoryBanner;

    public ProductCategory() {
    }

}
